-
Notifications
You must be signed in to change notification settings - Fork 935
Add in ByCode support of all type mappings on Id #1848
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add in ByCode support of all type mappings on Id #1848
Conversation
//void Type<TPersistentType>(object parameters) where TPersistentType : IIdentifierType; | ||
//void Type(System.System.Type persistentType, object parameters); | ||
//void Column(Action<IColumnMapper> columnMapper); | ||
//void Columns(params Action<IColumnMapper>[] columnMapper); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The column methods are not lacking, they are here through inherited IColumnsMapper
.
.Type<TPersistentType>(parameters); | ||
} | ||
|
||
public static void Type(this IIdMapper idMapper, System.Type persistentType, object parameters) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it the only method that needs to be added to interface? I think it's better to keep other methods as extensions and inline them.
@@ -66,6 +67,38 @@ public void Type(IIdentifierType persistentType) | |||
} | |||
} | |||
|
|||
public void Type(System.Type persistentType, object parameters) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a(!) future I would like to have a method which accepts IDictionary<string, object>
for parameters.
Mapping by code does not currently allow to set a parameterized type on ids.
This is an undue limitation, which may cause issues to users of custom types, and may also hinder usage of #1844 with mapping by code.
Having checked the xsd, this was the only case lacking full type specification possibilities in by-code. The
type
element is used onelement
,property
,key-property
andid
. By code was already allowing to define parameters on the three former.